<template>
  <a-layout>
    <div class="detail">
    <div class="info-card tab-card" :style="{ backgroundImage: 'url('+item.bg+')'}">
      <div class="content">
        <img :src="item.pic" :alt="item.name" class="movie-image">
        <h1>{{ item.name }} （ {{ item.onlineTime.split('-')[0] }} ）</h1>
        <div class="icon">收视率:{{ item.score }}</div>
        <h2>
          <a-space size="large">
            <strong style="font-size: 20px">电视剧</strong> <span style="font-size: 20px">{{ item.tags.join(' | ') }}</span>
          </a-space>
        </h2>
        <div class="movie-info">
          <p>
            <span><strong>导演:</strong> {{ item.director }}</span>
            <span><strong>编剧:</strong> {{ item.writers.join(', ') }}</span>
          </p>
          <p><span><strong>制作公司:</strong> {{ item.company.join(', ') }}</span></p>
          <p>
            <span><strong>上映日期:</strong> {{ item.onlineTime }}</span>
            <span><strong>上映平台:</strong> {{ item.plats.join(', ') }}</span>
          </p>
        </div>
        <p class="movie-description">{{ item.description }}</p>
        <p class="movie-info">
          <span><strong>豆瓣得分:</strong> {{ 8.1 }}</span>
          <span><strong>其他平台得分:</strong> {{ 'xxx' }}</span>
        </p>
      </div>
    </div>
    <a-card class="tab-card" title="数据变化趋势" subti>
      <img src="https://pic.616pic.com/ys_bnew_img/00/26/48/BvkpdDnLbn.jpg" />
    </a-card>
    <a-card class="tab-card" title="世界设定和背景">
      <a-table :dataSource="contents.data" :columns="contents.columns" :showHeader="false" :pagination="false"></a-table>
    </a-card>
    <a-card class="tab-card" title="剧情分析">
      <a-table :dataSource="contents.data" :columns="contents.columns" :showHeader="false" :pagination="false"></a-table>
    </a-card>
    <a-card class="tab-card" title="制作">
      <a-table :dataSource="contents.data" :columns="contents.columns" :showHeader="false" :pagination="false"></a-table>
    </a-card>
    <a-card class="tab-card" title="人物关系">
      <a-table :dataSource="contents.data" :columns="contents.columns" :showHeader="false" :pagination="false"></a-table>
    </a-card>
    <a-card class="tab-card" title="人物分析">
      <a-table :dataSource="characters.data" :columns="characters.columns"></a-table>
    </a-card>
    <a-card class="tab-card" title="受众人群画像" subti>
      展示受众人群分布
      <img src="https://pic.616pic.com/ys_bnew_img/00/26/48/BvkpdDnLbn.jpg" />
    </a-card>
    </div>
  </a-layout>
</template>

<script>
import mockData from '@/mock/detail.js'
export default {
  computed: {
    item() {
      return mockData.item
    },
    contents() {
      return mockData.contents
    },
    characters() {
      return mockData.characters
    }
  }

};
</script>

<style lang="less" scoped>
/* 样式可以根据你的需要自行添加 */
.detail {
  margin: 0;
  .info-card {
    border-bottom: 1px solid var(--primaryColor);
    background-position: left top;
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 5px;
    overflow: hidden;
    height: 500px;
    background-color: #041527;
    .content {
      background-color: rgba(0,0,0,0.8);
      position: relative;
      padding: 20px 20px 20px 340px;
      height: 500px;
      color: #fff;
      text-align: left;
      font-size: 16px;
      .movie-image {
        width: 300px;
        height: auto;
        margin: 20px 0;
        position: absolute !important;
        left:20px;
        top: 10px;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 3px 8px rgba(255,255,255,.2);
      }
      h1 { font-size: 25px; margin-bottom: 30px }
      h2 { font-size: 20px; }
      .movie-info {
        text-align: left;
        margin: 25px 0;
        p { margin-bottom: 10px }
        span { margin: 0 30px 0 0; }
      }
    }
    .movie-description {
      margin: 30px 0;
    }
    .icon {
      position: absolute;
      right: 20px; top: 20px;
      height: 70px;
      width: 140px;
      line-height: 58px;
      border-radius: 35px;
      color: #fff;
      background-color: rgba(255,255,255, .2);
      border:double 6px #041527;
      text-align: center;
      font-size: 18px;
    }
  }
  .tab-card {
    margin: 10px 10px 15px 10px;
    background-color: #fff;
    box-shadow: 0 3px 8px rgba(66,66,66,.2);
  }
}



</style>
